<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link rel="stylesheet" type="text/css" href="Admin/webroot/css/style.css" />
		<title>微信菜单管理</title>
	</head>
	<script type="text/javascript" src="Admin/webroot/js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="Admin/webroot/js/global.js"></script>
	<script type="text/javascript" src="Admin/webroot/js/weixin.js"></script>

	<body>
		<!--[if lte IE 6]>
<script src="js/DD_belatedPNG_0.0.8a.js" language="javascript" type="text/javascript"></script>
<script type="text/javascript">
	DD_belatedPNG.fix('.pngfix');
</script>
<![endif]-->
		<div class="rightbox">
			<div class="rightbox-col" id="rightbox">
				<div class="main">
					{include file='../Common/main_title.html'}
					<div class="bd wxmenu">
						
						<a title="从微信服务器获取数据并更新本地数据库" onclick="confirm_this('本地数据库将会被覆盖，你确定继续？','index.php?g=admin&m=wxmenu&a=refresh_menu')" href="javascript:;" class="add-pro">更新本地</a>
						<a title="删除微信服务器上的数据但不会删除本地数据库" href="javascript:;" onclick="confirm_this('你确定要删除微信服务器上的菜单？','index.php?g=admin&m=wxmenu&a=del_menu')" href=" javascript:; " class="add-pro ">删除菜单</a>
						<a title="把现在本地数据提交到微信服务器 " href="javascript:;" onclick="confirm_this('你确定要覆盖微信服务器上的菜单？','index.php?g=admin&m=wxmenu&a=sumbit_menu')" class="add-pro ">提交菜单</a>
						<div class="height_20 ">
						</div>
                    
						<div class="pro-list ">

							<div class="pro-list-title ">

								<ul>

									<li class="pro-id ">ID</li>

									<li class="column-name ">菜单名</li>

									<li class="column-sort ">排序</li>
                                    <li class="column-sort ">类型</li>
									<li class="opreate ">操作</li>

								</ul>
                                
							</div>

							<div class="pro-list-bd ">

								{foreach key=key from=$view_menu item=menu}

								<ul>

									<li class="pro-id ">
										<input type="checkbox" name="chklist " value="{$menu.id}" />{$menu.id}</li>

									<li class="column-name ">{$menu.name}</li>

									<li class="column-sort "><input type="text" order_id='{$menu.id}' onblur="ordering(this,'wxmenu')" class="pro-sort-input" value="{$menu.ordering}" /></li>
                                     <li class="column-sort ">{if $menu.type==1}链接{elseif $menu.type==2}事件{/if}</li>
									<li class="opreate ">
                                        <a onclick="hy_toggle(this,'is_show','2',{$menu.id})" href="javascript:void(0) ">{if $menu.is_show==1}隐藏{else}显示{/if}</a> |
										<a onclick="edit_menu({$menu.id}) " href="javascript:void(0) ">编辑</a> |
										<a onclick="del_this(this, 'index.php?g=admin&m=wxmenu&a=del_btn&id={$menu.id}') " href="javascript:void(0) ">删除</a> |
									</li>

								</ul>

								{if $menu.sub_button} {foreach from=$menu.sub_button key=subkey item=sub}

								<ul>

									<li class="pro-id ">
										<input type="checkbox" name="chklist " value=" " />{$sub.id}</li>

									<li class="column-name ">--|{$sub.name}</li>

									<li class="column-sort "><input type="text" order_id='{$sub.id}' onblur="ordering(this,'wxmenu')" class="pro-sort-input" value="{$sub.ordering}" /></li>
                                    <li class="column-sort ">{if $sub.type==1}链接{elseif $sub.type==2}事件{/if}</li>
									<li class="opreate ">
									    <a onclick="hy_toggle(this,'is_show','2',{$sub.id})" href="javascript:void(0) ">{if $sub.is_show==1}隐藏{else}显示{/if}</a> |
                                        <a onclick="edit_menu({$sub.id})" href="javascript:void(0) ">编辑</a> |
										<a onclick="del_this(this, 'index.php?g=admin&m=wxmenu&a=del_btn&id={$sub.id}') " href="javascript:void(0) ">删除</a> |
									</li>

								</ul>

								{/foreach} {/if} {/foreach}



							</div>

							<div class="pro-list-bottom ">

								<div class="select-a ">
									<input type="checkbox" flag="0 " onclick="select_all(this) " value=" " />全选</div>

								<a href="javascript:void(0) " onclick="del_all() " class="del ">删除</a>

								<a title="新建一级菜单 " onclick="add_main_menu() " href="javascript:void(0) " class="del ">新建菜单</a>

								<div class="page ">{$user_list_page}</div>

							</div>

						</div>

					</div>

				</div>

			</div>

			<div class="clear "></div>

		</div>

	</body>

</html>